Hybris Sales UX API
Tax Estimate (topupBalance) TMF-654 GET
taxEnquery
Get the tax estimations by the postcode from matrixx
URL
http://[localhost]:[port]/ecom-sales-ux/v1/{businessId}/topupBalance
uri Param
name | type | description | required |
---|---|---|---|
businessId | string | 2 letter ISO 3166 country code (TT, BB, JM, PA, PR etc.) identifying the business unit. Expected one is "PR"-Puerto Rico | Y |
Header
name | value | description | required |
---|---|---|---|
client_id | string | The client_id identifying the channel. | Y |
client_secret | string | Password associated with the client_id. | Y |
X-Correlation-ID | string | Identifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction. Note - Mule default behavior creates a sample x-correlation-id field if value is not passed from client, API will use this value in case value is not passed in API request | N |
channelId | string | ChannelId of the consumer Example: "QPay" | Y |
Query Param
name | type | description | required |
---|---|---|---|
logicalResource.id | string | To list the topupBalance of a specific MSISDN id | Y |
reason | string | The execution mode Example: 2 | Y |
amount.amount | string | top up amount | Y |
characteristics.name | string | name of the characteristic example : "zipcode" | Y |
characteristics.value.Plus4 | string | 4-digit Zip+4 code | Y |
characteristics.value.PostalCode | string | 5-digit Postal Code | Y |
cURL request
curl --location 'https://nonprod.esb.cloud.lla.com/dev/ecom-sales-ux/v1/PR/topupBalance?logicalResource.id=11254923434&reason=2&amount.amount=200&characteristics.value.Plus4=2023&characteristics.value.PostalCode=20238&characteristics.name=zipCode' \
--header 'X-Correlation-ID: 644e1dd7-2a7f-18fb-b8ed-ed78c3F92c2b' \
--header 'client_id: 784c9a6dd7ae49768816cab57fcf1fa1' \
--header 'client_secret: 187b259EB77441babbF611d2646C670d' \
--header 'channelId: QPay'
Response
[
{
"id": "1", //PurchaseInfoArray.BalanceImpactGroupList.BalanceImpactList.BalanceResourceId
"name": "Prepaid Balance", //PurchaseInfoArray.BalanceImpactGroupList.BalanceImpactList.BalanceTemplateName
"@type": "MainBalance", //set as "MainBalance" if "//PurchaseInfoArray.BalanceImpactGroupList.BalanceImpactList.IsMainBalance" is equal 'true'
"description": "United States dollar", //PurchaseInfoArray.BalanceImpactGroupList.BalanceImpactList.BalanceClassName
"externalId": "Subscription Purchase Recharge Offer c03114d0-32a8-11ed-b038-0a936d9da655", //RelatedMsgId
"remainingValue": {
"amount": 2.3, //BalanceImpactList.CurrentBalanceAmount
"units": "USD" // set 'usd' if 'IsActualCurrency = trie' else "" (empty string)
},
"validFor": {
"startDateTime": "2024-11-27T11:08:18.000000-07:00", //BalanceImpactList.BalanceStartTime
"endDateTime": "65535-12-31T23:59:59.999999Z" //BalanceImpactList.BalanceEndTime
},
"partyAccount": {
"id": "S-101", //BalanceImpactList.BalanceOwnerExternalId
"@type": "SubscriptionRef" //HD
},
"product": [
{
"id": "138", //BalanceImpactOfferList.CatalogItemId
"name": "RechargeTaxInquiry", //BalanceImpactOfferList.CatalogItemExternalId
"@type": "CatalogRef", //HD
"productCharacteristic": [
{
"name": "BalanceClassId",
"value": "840"
},
{
"name": "BalanceOwnerId",
"value": "0-1-5-2185"
},
{
"name": "BalanceTemplateId",
"value": "21037"
},
{
"name": "DebtBalanceType",
"value": "not_debt"
},
{
"name": "Flags",
"value": "1"
},
{
"name": "QuantityUnit",
"value": "none"
},
{
"name": "SourceEventType",
"value": "4"
},
{
"name": "ResourceId",
"value": "0" //PurchaseInfoArray.ResourceId
}
],
"productOffering": {
"id": "204", //ProductOfferId
"name": "purchased_offer" //OfferType
}
}
],
"taxItem": [
{
"taxAmount": {
"unit": "USD",
"value": 20.0
},
"UpdateType": "1",
"@type": "TaxItem"
},
{
"taxAmount": {
"unit": "USD",
"value": -20.0
},
"UpdateType": "3",
"@type": "TaxItem"
},
{
"taxAmount": {
"unit": "USD",
"value": 2.1
},
"taxCategory": "STATE SALES TAX",
"taxRate": 0.105,
"UpdateType": "14",
"PassType": "00",
"@type": "TaxItem"
},
{
"taxAmount": {
"unit": "USD",
"value": 0.2
},
"taxCategory": "CITY SALES TAX",
"taxRate": 0.01,
"UpdateType": "14",
"PassType": "00",
"@type": "TaxItem"
}
],
"impactedAmount": {
"amount": 2.3, //BalanceImpactList.ImpactAmount
"units": "USD" // set 'usd' if 'IsActualCurrency = trie' else "" (empty string)
}
}
]
Definitions:
name | type | description | required |
---|---|---|---|
id | string | Resource ID of balance instance. Example: value of BalanceResourceId | N |
name | string | Name of balance template as defined in My MATRIXX. Example: value of BalanceTemplateName | N |
@type | string | Main balance flag | N |
description | string | Class name of balance as defined in pricing file. Example: value of BalanceClassName | N |
externalId | string | Encoded field used to correlate system wide logging. Example: value of RelatedMsgId | N |
remainingValue | object | remaining value object | N |
remainingValue.amount | number | Current balance amount. May not be accurate. | N |
remainingValue.units | string | unit value of the amount | N |
validFor | object | valid for object | N |
validFor.startDateTime | string | start date of the validity Example: value of BalanceStartTime | N |
validFor.endDateTime | string | end date of the validity Example: value of BalanceEndTime | N |
partyAccount | object | party account object | N |
partyAccount.id | string | party account identifier Example: value of BalanceOwnerExternalId | N |
partyAccount.@type | string | type of the party account | N |
product | array object | product array | N |
product.id | string | product identifer Example: value of CatalogItemId | N |
product.name | string | name of the product Example: value of CatalogItemExternalId | N |
product.@type | string | reference type of the product. | N |
product.productCharacteristic | array object | product characteristic array | N |
product.productCharacteristic.name | string | Name of the product characteristic | N |
product.productCharacteristic.value | string | Value of the product characteristic | N |
product.productOffering | object | product offering object | N |
product.productOffering.id | string | Product offering identifier Example: value of ProductOfferId | N |
product.productOffering.name | string | Name of the product offering Example: value of OfferType | N |
taxItem | array object | tax Item array | N |
taxItem.taxAmount | object | tax amount object | N |
taxItem.taxAmount.unit | string | unit of the tax amount | N |
taxItem.taxAmount.value | number | tax amount | N |
taxItem.taxCategory | string | name of the tax | N |
taxItem.taxRate | number | rate of the tax | N |
taxItem.updateType | string | Type of balance update. | N |
taxItem.PassType | string | Pass Type indicates how tax is represented on an invoice | N |
taxItem.@type | string | tax item type | N |
impactedAmount | object | impacted amount object | N |
impactedAmount.amount | number | impacted amount | N |
impactedAmount.units | string | units of the impacted amount | N |
product.productCharacteristic Values:
productCharacteristic name | type | description | required |
---|---|---|---|
BalanceClassId | string | Balance class unique identifier. | N |
BalanceOwnerId | string | Balance owner identifier | N |
BalanceTemplateId | string | Balance template identifier | N |
DebtBalanceType | string | Debit balance type | N |
Flags | string | Flags | N |
QuantityUnit | string | Quantity units | N |
SourceEventType | string | source event type | N |
ResourceId | string | resource identifer | N |